<template>
    <div>
      评价晒单：<input type="text" v-model="content">
      <button @click="biao">发表</button>
    </div>
</template>

<script>
    export default {
        name: "comment",
      data(){
          return{
            content:'',
          }
      },
      methods:{
          biao(){
            this.axios.post('http://localhost:8000/addcomment/',this.qs.stringify({uid:localStorage.getItem('uid'),content:this.comment})).then((res=>{

              if (res.data.code==200){
                alert('评论成功');
                this.$router.push({'name':'allgoodsinfo'})

              }

            }))


          }
      }
    }
</script>

<style scoped>

</style>
